<template>
  <el-form inline>
    <el-form-item v-for="(item, index) in state.options" :key="item.type">
      <el-select v-model="item.choiced" :placeholder="item.name" filterable @change="store.handleSearch(index)">
        <template v-if="item.type != 'platform_from'">
          <el-option v-for="item in item.options" :key="item.value" :label="item.label" :value="item.value" />
        </template>
        <template v-else>
          <el-option v-for="item in platforms" :key="item.value" :label="item.label" :value="item.value" />
        </template>
      </el-select>
    </el-form-item>
    <el-form-item>
      <el-select v-model="state.userId" placeholder="分组" style="width: 200px" @change="store.onChangeUser">
        <el-option v-for="item in state.users" :key="item.value" :label="item.label" :value="item.value" />
      </el-select>
    </el-form-item>
  </el-form>
</template>
<script setup>
const { store, state } = inject('Sell')
const { platforms, platformObj } = inject('/board')
</script>
<style lang="scss" scoped>
:deep(.el-form-item) {
  margin-right: 16px;
}

:deep(.el-select) {
  width: 200px;
}
</style>
